package com.ylkj.timer.webservice;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;


public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
//		WSServerService wSServerService = new WSServerService();
//		WSServerDelegate wSServerServicedelegate = wSServerService.getWSServerPort();
//		try {
//			Document doc =DocumentHelper.parseText(wSServerServicedelegate.excute((new Test()).getSendString()));
//			System.out.println("发送："+(new Test()).getSendString()+"返回："+doc.asXML());
//		} catch (DocumentException e) {
//			e.printStackTrace();
//		}
		SimpleDateFormat sdf =   new SimpleDateFormat( " yyyy-MM-dd HH:mm:ss " );
		 try {
			Date date = sdf.parse( " 2008-07-10 19:20:00 " );
			System.out.println(date);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		
	}
	
	public String getSendString()
	{
		Document doc = DocumentHelper.createDocument();
		Element DBSET = doc.addElement("DBSET");
		Element ROW = DBSET.addElement("ROW");
		Element COL1 = ROW.addElement("COL");
		COL1.addAttribute("NAME", "TYPE");
		COL1.setText("2");
		Element COL2 = ROW.addElement("COL");
		COL2.addAttribute("NAME", "NUM");
		COL2.setText("2");
		Element COL3 = ROW.addElement("COL");
		COL3.addAttribute("NAME", "CONS_ID");
		COL3.setText("123456");
		return doc.asXML();
	}
}
